package com.mc.algorithm;

public class NumToStr {
	
	public static void main(String[] args){
		int a = 12258;
		String str = String.valueOf(a);
		trans(0,str,"");
	}
	public static void trans(int start,String str,String res){
		if(start>str.length())
			return;
		String temp = res;
		if(start==str.length()){
			System.out.println(res);
			return;
		}
		for(int i=0;i<2;i++){
			String cur = str.substring(start, Math.min(start+i+1, str.length()));
			int curNum =Integer.parseInt(cur);
			if(curNum>26)break;
			char ch = (char)(curNum+'a'-1);
			temp = res.concat(String.valueOf(ch));
			trans(start+i+1,str,temp);
		}
	}
}
